from django.db import models

# Create your models here.
from django.contrib.auth.models import AbstractUser
#
#
class User(AbstractUser):
    mobile = models.CharField(max_length=11,unique=True, verbose_name='手机号')
    money = models.DecimalField(max_digits=9, default=0, decimal_places=2, verbose_name="钱包余额" )
    credit = models.IntegerField(default=0, verbose_name="用户积分")
    avatar = models.ImageField(upload_to="avatar/%Y/", null=True,default='', verbose_name="用户头像")
    nickname = models.CharField(max_length=255, verbose_name="用户昵称", default="", null=True, blank=True)

    class Meta:
        db_table = "lf_users"
        verbose_name = "用户信息"
        verbose_name_plural = verbose_name